{include file='header_with_login.tpl'}

<p><b>This is where you can manage the stuff you've submitted.</b></p>

<div class="main">
<table>

{foreach from=$media item=piece}
<tr>
	<td style="vertical-align: top;"><a href="/media/view/url/{$piece.url}"><img src="{$piece.thumb_url}" border="0"></a></td>
	<td style="height: 60px; vertical-align: top;">
		<form method="post" style="margin: 0px;" action="/manage/edit/">
		<div id="title_text_{$piece.id}" style="display: inline;">
			<a href="javascript: editTitle('{$piece.id}');">{$piece.title}</a>
			<br />{$piece.date|date_format:"%B %e, %Y"}, {$piece.date|date_format:"%l:%M%p"|lower}
			<div style="margin-top: 0px; font-size: 11px;"><a href="javascript: deleteMedia('{$piece.id}')">Delete photo</a></div>
		</div>

		<div id="title_editable_{$piece.id}" style="display: none; ">
			<textarea name="title" style="font: normal 11px arial, sans-serif; width: 100%; height: 40px;">{$piece.title}</textarea>
		</div>
				
		<div id="submit_area_{$piece.id}" style="display: none;">
			<input type="submit" name="update_photo" value="Update Title">
			<input type="button" name="nevermind" value="Nevermind" onClick="javascript: showTitle('{$piece.id}');">
		</div>

		<input type="hidden" name="id" value="{$piece.id}">
		</form>

		<form id="delform_{$piece.id}" method="post" action="/manage/delete">
		<input type="hidden" name="del_id" value="{$piece.id}">
		</form>
	</td>
</tr>
{/foreach}

</table>
</div>

{include file='footer.tpl'}
